
import android.content.Context
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.WindowManager
import com.longshihan.module_sample.R
import com.longshihan.module_sample.huazhu.mvp.contract.LoadingContract
import com.longshihan.module_sample.huazhu.mvp.model.entity.AppEntity
import com.longshihan.module_sample.huazhu.mvp.presenter.LoadingPresenter

class LoadingActivity1 : AppCompatActivity() ,LoadingContract.View{
    override fun showLoading() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun hideLoading() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun showError(type: Int, message: String?) {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun closeActivity() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun showData(str: AppEntity?) {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    val present:LoadingPresenter= LoadingPresenter(this)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_loading1)
        val displaymetrics = DisplayMetrics()
        (applicationContext.getSystemService(Context.WINDOW_SERVICE) as WindowManager)
                .defaultDisplay.getMetrics(displaymetrics)
        present.fetch(""+displaymetrics.widthPixels * displaymetrics.heightPixels)
    }
}
